package com.youchuang.redistest.dao;

import java.util.List;
import java.util.Map;

import org.springframework.data.repository.query.Param;

import com.youchuang.redistest.util.PropertiesUtil;

public interface BaseDAO<T> {

	// 指定一个前缀，避免与其他项目搞混
	public static final String CACHE_PREFIX = PropertiesUtil.getValue("cache.properties", "redis.cache.prefix");

	public static final String CACHE_LIST = "list";

	void save(T t);

	void delete(String id);

	int update(T t);

	int deleteByIds(@Param("ids") String ids);

	T get(String id);

	List<T> selectByParams(Map<String, Object> params);

	List<T> queryAll();

}
